<template>
	<view>
		<view class="shadow_box"></view>
		<view class="detail">
			<jyf-parser :html="detail.content" ref="article"></jyf-parser>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				type: '',
				detail: {}
			}
		},
		onLoad(options) {
			this.type = options.type
			let title = options.type == 1 ? '关于我们' : options.type == 1 ? '用户须知' : '用户权益'
			uni.setNavigationBarTitle({
				title
			})
			this.$http.get('/api/clause', {
				type:this.type
			}).then(res => {
				if (res.data.code == 200) {
					console.log(res.data.data)
					this.detail = res.data.data[0]
					this.$u.richImg(this.detail.content)
				} else {
					this.$u.msg(res.data.msg)
				}
			})
		},
		methods: {

		}
	}
</script>

<style lang="less">
	page {
		background: #fff;
	}

	.detail {
		padding: 32rpx;
	}

	.shadow_box {
		box-shadow: 0rpx 3rpx 10rpx 2rpx rgba(0, 0, 0, .16);
	}
</style>
